# 4.知识点数据结构之列表list
names = "A,B,C,D"
print (names)
names_list = ["A,B,C,D"]
print (names)



names = "AR,B,C,D"
print (names[0])
names_list = ["AR,B,C,D"]
password_list = [123456,789789,321321]
print (names[0])




names = ["A","B","C","D"]
# 知识点slices（切片）数值是指values在list中的位置

# 1.1   正向取值 0 1 2 3
#[1:3] 3取不到  如果有0 0可省略不写
print(names[1:3])
print(names[0:3])
print(names[:3])

# 1.2  反向取值   -4 -3 -2 -1      [-3:-1]-1取不到。最后为0时，不能写0，省略就行了
print(names[-3:-1])
print(names[-3:])





num=[1,2,3,4,5,6,7,8,9,]
print(num[::])

